f27aee3e4ac834e94391609d554f0ad0d39e836b,plugins/github/src/org/jetbrains/plugins/github/tasks/GithubRepositoryEditor.java,GithubRepositoryEditor,createCustomPanel,#,70
Before Change
installListener(myRepoAuthor);
myRepoLabel = new JBLabel("Repository:", SwingConstants.RIGHT);
myRepoName = new JTextField();
installListener(myRepoName);
myTokenLabel = new JBLabel("API Token:", SwingConstants.RIGHT);
myToken = new JTextField();
After Change
myRepositoryLabel = new JBLabel("Repository:", SwingConstants.RIGHT);
myRepoAuthor = new MyTextField("Repository Owner");
myRepoName = new MyTextField("Repository Name");
myRepoAuthor.setPreferredSize("SomelongNickname");
myRepoName.setPreferredSize("SomelongReponame-with-suffixes");
JPanel myRepoPanel = new JPanel(new GridBagLayout());
GridBag bag = new GridBag().setDefaultWeightX(1).setDefaultFill(GridBagConstraints.HORIZONTAL);
myRepoPanel.add(myRepoAuthor, bag.nextLine().next());
myRepoPanel.add(new JLabel("/"), bag.next().fillCellNone().insets(0, 5, 0, 5).weightx(0));
myRepoPanel.add(myRepoName, bag.next());
myTokenLabel = new JBLabel("API Token:", SwingConstants.RIGHT);
myToken = new MyTextField("OAuth2 token");
myTokenButton = new JButton("Create API token");
myTokenButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
generateToken();
doApply();
}
});
JPanel myTokenPanel = new JPanel();
myTokenPanel.setLayout(new BorderLayout(5, 5));
myTokenPanel.add(myToken, BorderLayout.CENTER);
myTokenPanel.add(myTokenButton, BorderLayout.EAST);
installListener(myHost);
installListener(myRepoAuthor);
installListener(myRepoName);
installListener(myToken);
return FormBuilder.createFormBuilder().setAlignLabelOnRight(true).addLabeledComponent(myHostLabel, myHost)